package cn.sdufe.cs.seleniumtest;
import org.openqa.selenium.By;  
import org.openqa.selenium.WebDriver;  
import org.openqa.selenium.WebElement;  
import org.openqa.selenium.firefox.FirefoxDriver;  
  
  
public class seleniumHello {  
      
    public static void main(String[] args){  
        System.setProperty("webdriver.gecko.driver", "D:\\Java\\geckodriver-v0.20.1-win64\\geckodriver.exe");  
        WebDriver driver=new FirefoxDriver();  
        driver.get("http://www.baidu.com/");  
        driver.manage().window().maximize();  
        WebElement txtbox=driver.findElement(By.name("wd"));  
        txtbox.sendKeys("WebDriver");  
        WebElement btn=driver.findElement(By.id("su"));  
        btn.click();  
        //driver.close();  
    }  
}